<?php

class MarketAction extends Action
{
	const PAGE_SIZE = 5;
	public function index()
	{
		//商品分类-超市
		$this->cate = CateModel::getCateByPid(23);
		//特价商品
		$options['goods_label'] = 'price';
		$this->price_goods = GoodsModel::getGoodsList(0, 6, $options, array("view_count" => 'desc'));
		$this->f1_goods = GoodsModel::getGoodsList(2, 5, '');
		$this->f2_goods = GoodsModel::getGoodsList(3, 5, '', array("view_count" => 'desc'));
		$this->f3_goods = GoodsModel::getGoodsList(4, 5, '', array("view_count" => 'desc'));
		//ad
		$options['place_tag'] = 'market2';
		$options1['place_tag'] = 'market1';
		$this->lunbo_ad = AdModel::getAdList($options);
		$this->right_ad = AdModel::getAdList($options1);

		$this->assign("page",$page);
		$this->assign("shoplist",$res);
		$this->assign("current_class",3);

		$this->goods_view=unserialize(stripslashes(cookie('goods_view')));
		$this->cat=R('Goods/goods_cat');
		$shop_cart=cookie('shopcart');
		$this->cart_num=!empty($shop_cart)?count(unserialize(stripslashes($shop_cart))):0;
		$this->assign("cat_now", $cat_now);
		$this->name= "品牌街-蚂蚁街";
		$this->user=$_SESSION['euname'];
		$this->assign("keyword",$key);
		$this->display();
	}

}